using System;
using System.Collections.Generic;

namespace Game500.ClientServerCommon.Src
{
  [Serializable]
  public class FrontendRequest
  {
    #region RequestTypeEnum enum

    public enum RequestTypeEnum
    {
      GetInfo,
      CreateGame
    }

    #endregion

    public FrontendRequest(string gameMessage, Guid mapId)
    {
      GameMessage = gameMessage;
      MapId = mapId;
      RequestType = RequestTypeEnum.CreateGame;
    }

    public FrontendRequest()
    {
      RequestType = RequestTypeEnum.GetInfo;
    }

    public RequestTypeEnum RequestType { get; private set; }
    public string GameMessage { get; private set; }
    public Guid MapId { get; private set; }
  }

  [Serializable]
  public class FrontendInfo
  {
    public FrontendInfo(string serverName, List<Guid> availableMaps, List<NetworkGameInfo> activeGames)
    {
      ServerName = serverName;
      AvailableMaps = availableMaps;
      ActiveGames = activeGames;
    }

    public FrontendInfo()
    {
    }

    public string ServerName { get; set; }
    public List<Guid> AvailableMaps { get; set; }
    public List<NetworkGameInfo> ActiveGames { get; set; }
  }
}